

#include <boost/asio.hpp>
#include <memory>
#include <cstdint>

typedef int32_t errorcode_t;

class TcpConnector
{
public:
};

class TcpAcceptor
{

};

class EventLoop
{
public:
    void start();
    void stop();

private:
    boost::asio::io_service _io_service;
};

class TcpConnection
{
public:
    TcpConnection(EventLoop& loop);

    void on_connect();
    void on_disconnect(errorcode_t ecode);
    void on_recv();
public:
    std::shared_ptr<boost::asio::ip::tcp::socket> _socket;
};

int main()
{
    boost::asio::io_service io_service;
    auto work_ptr = std::make_shared<boost::asio::io_service::work>(io_service);
    io_service.run();
    return 0;
}